home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 2475 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: news.wasatch.com!news
  2. From: rdemanow@wasatch.com (Richard Demanowski)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: "getchar()" vs "getc()"
  5. Date: 20 Jan 1996 00:31:14 GMT
  6. Organization: wasatch.com
  7. Message-ID: <4dpd4i$e4j@twin.wasatch.com>
  8. References: <4d8gvd$9kd@wumpus.cc.uow.edu.au>
  9. NNTP-Posting-Host: port23.wasatch.com
  10. X-Newsreader: WinVN 0.99.5
  11.  
  12. In article <4d8gvd$9kd@wumpus.cc.uow.edu.au>, tp86@wumpus.cc.uow.edu.au 
  13. says...
  14. >
  15. >Hello to all.
  16. >        I got something here to ask you guys. I would like to know what 
  17. different
  18. >between "getchar()" and "getc() and the different between "putchar()" and 
  19. >"putc()" ????
  20. >
  21.  
  22. In all of the implementations that I have seen, (I am researching a way to
  23. make a cetch() function without conio.h ...) they are pretty much the same.
  24.  
  25. On all of the compilers I own, getchar() is just a macro defining the
  26. following:
  27.  
  28. #define getchar() getc(sdtin)
  29.  
  30. They do exactly the same thing.  The only difference is that getchar() is
  31. already tied to the stdin stream instead of a user-defined stream.
  32.  
  33. RichD
  34. -- 
  35. rdemanow@wasatch.com           |I am lost.  I have gone to look for
  36.                                |myself.
  37. press any key to continue ...  |If I should return before I get back,
  38. press any other key to quit ...|please ask me to wait here.
  39.  
  40.